#ifndef _BLUETOOTH_H_
#define _BLUETOOTH_H_

// Error Defines

#define OK 		0	// Defines data is as expected and valid
#define OVERFLOW	-1	// Overflows the buffer given, resulting in invalid data
#define BAD_DATA	-2	// Data wasn't as expected 

/****************************************************************
* 			UART LCD FUNCTIONS
****************************************************************/

void bluetooth_transmit(unsigned char data);
/*
*	Purpose: Transmit data to the Bluetooth Module
*	Input: Data to be transmitted
*	Output:	Nothing
*/

unsigned char bluetooth_receive();
/*
*	Purpose: Receive data from the Bluetooth Module
*	Input: Nothing
*	Output:	Data received	
*/

void bluetooth_flush();
/*
*	Purpose: Clear all old data in the buffer
*	Input: Nothing
*	Output: Nothing
*/

int bluetooth_sendcmd(unsigned char *in, char len_in);
/*
*	Purpose: Send a string to the Bluetooth module to print
*	Input:	in - Input buffer to be printed
*		len-in - Length of the buffer to be printed
*	Output: Returns OK or corresponding error codes
*/	

/****************************************************************
* 		Bluetooth Initialization Functions
****************************************************************/

int bluetooth_init();
/*
*	Purpose: Initialize the Bluetooth Device and check that communication is correct
*	Input: Nothing
*	Output: Returns OK or corresponding error codes
*/

int bluetooth_listen();
/*
*	Purpose: Device listens and waits for a response from the Bluetooth Bee
*	Input: Nothing
*	Output: Returns OK or corresponding error codes
*/

#endif
